import { createRouter, createWebHashHistory } from 'vue-router'

//1.导入组件 @表示src文件夹
import Home from '@/components/home/Home' //导入Home组件
import City from '@/components/city/City' //导入City组件

//2.定义路由规则
const routes = [
	{
		path:'/',
		component : Home,
		name : 'Home'
	},
	{
		path:'/city',
		component:City,
		name:'City'
	}
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
